package com.renhui.android.handwriting.service;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.util.Log;

public class TestService extends Service {

    @Override
    public void onCreate() {
        super.onCreate();
        Log.e("111", "Service onCreate");
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.e("111", "Service onStartCommand");
        try {
            Thread.sleep(100000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return super.onStartCommand(intent, flags, startId);
    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        Log.e("111", "Service onBind");
        return new Binder();
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.e("111", "Service onUnbind");
        return super.onUnbind(intent);
    }

    @Override
    public void onDestroy() {
        Log.e("111", "Service onDestroy");
        super.onDestroy();
    }
}
